<script setup lang="ts">
import { reactive, onMounted } from 'vue'

import { useCounterStore } from '@/store/index'
import Route from './components/route.vue'
// import axios from 'axios'

const store = useCounterStore()

onMounted(() => {
  // console.log(store.double)\
  useCount()
  console.log(af.name);

})

const af = reactive({
  name: 'home',
  img: ''
})

//  状态 解构


// store 响应式 解构
// const { count } = storeToRefs(store)

// 解构 store中的 action
const { increment } = store

const useCount = () => {
  increment()
  // 该方法 直接修改 state
  // store.$patch({
  //   count: 200
  // })
}

</script>
<template>
  <div class="center">
     <Route />
  </div>
</template>
<style scoped lang="scss">
</style>
